package com.dana.safeluckbdface_recong;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

/**
 * @ProjectName: Safeluckbdface_recong
 * @Package: com.dana.safeluckbdface_recong
 * @ClassName: User
 * @Description: java类作用描述
 * @Author: zhanwei.li
 * @CreateDate: 2024/7/16 15:33
 * @UpdateUser: 更新者
 * @UpdateDate: 2024/7/16 15:33
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class User implements Parcelable {
    private String userName;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public User(String userName) {
        this.userName = userName;
    }

    protected User(Parcel in) {
        userName = in.readString();
    }
    public void readFromParcel(Parcel in) {
        userName = in.readString();
        // 其他字段的读取...
    }
    public static final Creator<User> CREATOR = new Creator<User>() {
        @Override
        public User createFromParcel(Parcel in) {
            return new User(in);
        }

        @Override
        public User[] newArray(int size) {
            return new User[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString(userName);
    }
}
